<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>学生</title>
  <link rel="stylesheet" href="./bootstrap/bootstrap.min.css" />
  <link rel="stylesheet" href="./bootstrap/bootstrap-icons.css" />
  <link rel="stylesheet" href="./css/common.css" />
  <link rel="stylesheet" href="./css/student.css" />
</head>

<body class="application application-offset">
  <div class="container-fluid container-application">
    <div class="sidenav show" id="sidenav-main">
      <!-- Sidenav header -->
      <div class="sidenav-header d-flex align-items-center">
        <a class="navbar-brand" href="./index.html">
          <span class="logo">·ITCAST·</span>
        </a>
      </div>
      <!-- User mini profile -->
      <div class="sidenav-user d-flex flex-column align-items-center justify-content-between text-center">
        <!-- Avatar -->
        <div>
          <a href="#" class="avatar rounded-circle avatar-xl">
            <img alt="Image placeholder" src="https://yanxuan-item.nosdn.127.net/8b27deb1670c53e67c42ca3e1ed6fd12.jpg"
              class="" />
          </a>
          <div class="mt-5">
            <h5 class="mb-0 text-white">黑马前端</h5>
            <span class="d-block text-sm text-white opacity-8 mb-3">数据可视化</span>
            <a href="javascript:;" class="btn btn-sm btn-white btn-icon rounded-pill shadow hover-translate-y-n3">
              <span class="btn-inner--text">学前端来黑马</span>
            </a>
          </div>
        </div>
      </div>
      <!-- Application nav -->
      <div class="nav-application clearfix">
        <a href="./index.html" class="btn btn-square text-sm">
          <span class="btn-inner--icon d-block"><i class="bi bi-house bi-2x"></i></span>
          <span class="btn-inner--icon d-block pt-2">首页</span>
        </a>
        <a href="./student.html" class="btn btn-square text-sm active">
          <span class="btn-inner--icon d-block"><i class="bi bi-people bi-2x"></i></span>
          <span class="btn-inner--icon d-block pt-2">学生</span>
        </a>
        <a href="javascript:;" class="btn btn-square text-sm">
          <span class="btn-inner--icon d-block"><i class="bi bi-columns bi-2x"></i></span>
          <span class="btn-inner--icon d-block pt-2">排版</span>
        </a>
        <a href="javascript:;" class="btn btn-square text-sm">
          <span class="btn-inner--icon d-block"><i class="bi bi-files bi-2x"></i></span>
          <span class="btn-inner--icon d-block pt-2">资料</span>
        </a>
        <a href="javascript:;" class="btn btn-square text-sm">
          <span class="btn-inner--icon d-block"><i class="bi bi-receipt bi-2x"></i></span>
          <span class="btn-inner--icon d-block pt-2">就业</span>
        </a>
        <a href="javascript:;" class="btn btn-square text-sm">
          <span class="btn-inner--icon d-block"><i class="bi bi-gear bi-2x"></i></span>
          <span class="btn-inner--icon d-block pt-2">设置</span>
        </a>
      </div>
      <!-- Misc area -->
      <div class="card bg-gradient-warning">
        <div class="card-body">
          <h5 class="text-white">哈喽, 朋友!</h5>
          <p class="text-white mb-4">为什么不现在开始学习前端，创造一些令人惊叹的东西呢？</p>
          <a href="http://itcast.cn" class="btn btn-sm btn-block btn-white rounded-pill" target="_blank">Get started</a>
        </div>
      </div>
    </div>
    <div class="main-content position-relative">
      <nav class="navbar navbar-main navbar-expand-lg navbar-dark navbar-border" id="navbar-main">
        <div class="container-fluid">
          <!-- Navbar nav -->
          <div class="collapse navbar-collapse navbar-collapse-fade" id="navbar-main-collapse">
            <ul class="navbar-nav align-items-lg-center">
              <!-- Home  -->
              <li class="nav-item">
                <a class="nav-link pl-lg-0" href="./index.html"> 首页 </a>
              </li>
              <li class="nav-item">
                <a class="nav-link pl-lg-0" href="./index.html"> 传智教育 </a>
              </li>
              <li class="nav-item">
                <a class="nav-link pl-lg-0" href="./index.html"> 黑马程序员 </a>
              </li>
              <li class="nav-item">
                <a class="nav-link pl-lg-0" href="./index.html"> 文档 </a>
              </li>
            </ul>
            <!-- Right menu -->
            <ul class="navbar-nav ml-lg-auto align-items-center d-none d-lg-flex">
              <li class="nav-item dropdown dropdown-animate">
                <a class="nav-link pr-lg-0" href=".dropdown-menu" role="button" data-toggle="dropdown"
                  aria-haspopup="true" aria-expanded="false">
                  <div class="media media-pill align-items-center">
                    <span class="avatar rounded-circle">
                      <img alt="Image placeholder"
                        src="https://yanxuan-item.nosdn.127.net/8b27deb1670c53e67c42ca3e1ed6fd12.jpg" />
                    </span>
                    <div class="ml-2 d-none d-lg-block">
                      <span class="mb-0 text-sm font-weight-bold">Admin</span>
                    </div>
                  </div>
                </a>
              </li>
              <li class="nav-item">
                <a class="nav-link pl-lg-0" id="logout" href="javascript:;"> 退出 </a>
              </li>
            </ul>
          </div>
        </div>
      </nav>
      <div class="page-content">
        <div class="page-title mb-3">
          <div class="row justify-content-between align-items-center">
            <div class="col-md-6 mb-3 mb-md-0">
              <h5 class="h3 font-weight-400 mb-0 text-white">Students</h5>
              <span class="text-sm text-white opacity-8">一共有 <b class="total">0</b> 位学员</span>
            </div>
            <div class="col-md-6 d-flex align-items-center justify-content-between justify-content-md-end">
              <a id="openModal" href="javascript:;" class="btn btn-sm btn-white btn-icon-only rounded-circle ml-4">
                <span class="btn-inner--icon"><i class="bi bi-plus bi-2x"></i></span>
              </a>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col">
            <div class="card card-fluid">
              <div class="table-responsive" style="min-height: 1000px">
                <table class="table align-items-center">
                  <thead>
                    <tr>
                      <th>姓名</th>
                      <th>年龄</th>
                      <th>性别</th>
                      <th>组号</th>
                      <th>期望薪资</th>
                      <th>就业薪资</th>
                      <th>籍贯</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody class="list">
                    <!-- <tr>
                      <td>张杰</td>
                      <td>20</td>
                      <td>男</td>
                      <td>第2组</td>
                      <td>10000</td>
                      <td>13000</td>
                      <td>北京北京市东城区</td>
                      <td>
                        <a href="javascript:;" class="text-success mr-3"><i class="bi bi-pen"></i></a>
                        <a href="javascript:;" class="text-danger"><i class="bi bi-trash"></i></a>
                      </td>
                    </tr> -->
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>
        <!-- footer -->
        <div class="footer pt-5 pb-4 footer-light" id="footer-main">
          <div class="row text-center text-sm-left align-items-sm-center">
            <div class="col-sm-6">
              <p class="text-sm mb-0">© 2022 <a href="https://itcast.cn" class="h6 text-sm" target="_blank">前端学科</a>.
                All rights reserved.</p>
            </div>
            <div class="col-sm-6 mb-md-0">
              <ul class="nav justify-content-center justify-content-md-end">
                <li class="nav-item">
                  <a class="nav-link" href="#">Support</a>
                </li>
                <li class="nav-item">
                  <a class="nav-link" href="#">Terms</a>
                </li>
                <li class="nav-item">
                  <a class="nav-link pr-0" href="#">Privacy</a>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- add Modal -->
  <div class="modal fade" id="modal">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">添加学员</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
          <form id="form" class="g-3 row" autocomplete="off" novalidate>
            <div class="col-sm-6">
              <div class="form-group">
                <label class="input-group-label">姓名：</label>
                <input type="text" name="name" class="form-control" placeholder="请输入姓名" />
              </div>
            </div>
            <div class="col-sm-6">
              <div class="form-group">
                <label class="input-group-label">性别：</label>
                <div class="input">
                  <div class="form-check d-inline-block">
                    <input value="0" checked id="cb01" class="form-check-input" type="radio" name="gender" />
                    <label for="cb01" class="form-check-label">男</label>
                  </div>
                  <div class="form-check d-inline-block">
                    <input value="1" id="cb02" class="form-check-input" type="radio" name="gender" />
                    <label for="cb02" class="form-check-label">女</label>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-sm-6">
              <div class="form-group">
                <label class="input-group-label">年龄：</label>
                <input type="text" name="age" class="form-control" placeholder="请输入年龄" />
              </div>
            </div>
            <div class="col-sm-6">
              <div class="form-group">
                <label class="input-group-label">组号：</label>
                <input type="text" name="group" class="form-control" placeholder="请输入1-8组号" />
              </div>
            </div>
            <div class="col-sm-6">
              <div class="form-group">
                <label class="input-group-label">期望薪资：</label>
                <input type="text" name="hope_salary" class="form-control" placeholder="请输入期望薪资" />
              </div>
            </div>
            <div class="col-sm-6">
              <div class="form-group">
                <label class="input-group-label">就业薪资：</label>
                <input type="text" name="salary" class="form-control" placeholder="请输入就业薪资" />
              </div>
            </div>
            <div class="col-sm-12">
              <div class="form-group">
                <label class="input-group-label">籍贯：</label>
                <div class="input pl-0">
                  <select class="form-select custom-select" name="province">
                    <option value="">--省份--</option>
                  </select>
                  <select class="form-select custom-select" name="city">
                    <option value="">--城市--</option>
                  </select>
                  <select class="form-select custom-select" name="area">
                    <option value="">--地区--</option>
                  </select>
                </div>
              </div>
            </div>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
          <button type="button" class="btn btn-blue" id="submit">确认</button>
        </div>
      </div>
    </div>
  </div>
  <script src="./bootstrap/bootstrap.min.js"></script>
  <script src="./lib/axios.js"></script>
  <script src="./lib/form-serialize.js"></script>
  <script src="./js/common.js"></script>
  <script>
    const renderList = async () => { const _0xea7147 = await axios["\u0067\u0065\u0074"]("stneduts/".split("").reverse().join("")); const _0x2dba15 = _0xea7147["\u0064\u0061\u0074\u0061"]["\u006d\u0061\u0070"]((_0x3487ec, _0x3c7ec3) => { return ">dt<              \n>rt<            \n".split("").reverse().join("") + _0x3487ec["\u006e\u0061\u006d\u0065"] + '</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td>' + _0x3487ec["\u0061\u0067\u0065"] + ">dt<              \n>dt/<".split("").reverse().join("") + (_0x3487ec["\u0067\u0065\u006e\u0064\u0065\u0072"] === (0x3e7a0 ^ 0x3e7a0) ? "\u7537" : "\u5973") + '</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td>第' + _0x3487ec['group'] + '组</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td>' + _0x3487ec["\u0068\u006f\u0070\u0065\u005f\u0073\u0061\u006c\u0061\u0072\u0079"] + ">dt<              \n>dt/<".split("").reverse().join("") + _0x3487ec['salary'] + '</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td>' + _0x3487ec['province'] + '\x20' + _0x3487ec['city'] + '\x20' + _0x3487ec["\u0061\u0072\u0065\u0061"] + "=di-atad i<>\"3-rm sseccus-txet\"=ssalc \";:tpircsavaj\"=ferh a<                \n>dt<              \n>dt/<".split("").reverse().join("") + _0x3487ec["\u0069\u0064"] + "=di-atad i<>\"regnad-txet\"=ssalc \";:tpircsavaj\"=ferh a<                \n>a/<>i/<>\"nep-ib ib\"=ssalc ".split("").reverse().join("") + _0x3487ec["\u0069\u0064"] + "          \n>rt/<            \n>dt/<              \n>a/<>i/<>\"hsart-ib ib\"=ssalc ".split("").reverse().join(""); })["\u006a\u006f\u0069\u006e"](""); document['querySelector']("tsil.".split("").reverse().join(""))["\u0069\u006e\u006e\u0065\u0072\u0048\u0054\u004d\u004c"] = _0x2dba15; document["\u0071\u0075\u0065\u0072\u0079\u0053\u0065\u006c\u0065\u0063\u0074\u006f\u0072"]("latot.".split("").reverse().join(""))['innerHTML'] = _0xea7147["\u0064\u0061\u0074\u0061"]["\u006c\u0065\u006e\u0067\u0074\u0068"]; }; renderList(); const modalBox = document["\u0071\u0075\u0065\u0072\u0079\u0053\u0065\u006c\u0065\u0063\u0074\u006f\u0072"]("ladom#".split("").reverse().join("")); const modal = new bootstrap['Modal'](modalBox); const ps = document['querySelector']('[name=province]'); const cs = document['querySelector']("]ytic=eman[".split("").reverse().join("")); const as = document["\u0071\u0075\u0065\u0072\u0079\u0053\u0065\u006c\u0065\u0063\u0074\u006f\u0072"]("\u005b\u006e\u0061\u006d\u0065\u003d\u0061\u0072\u0065\u0061\u005d"); const initCity = async () => { const { data: _0x303e0d } = await axios["\u0067\u0065\u0074"]("\u002f\u0061\u0070\u0069\u002f\u0070\u0072\u006f\u0076\u0069\u006e\u0063\u0065"); const _0x1f88f3 = _0x303e0d['map'](_0x4aa543 => "\"=eulav noitpo<".split("").reverse().join("") + _0x4aa543 + '\x22>' + _0x4aa543 + ">noitpo/<".split("").reverse().join(""))['join'](''); ps["\u0069\u006e\u006e\u0065\u0072\u0048\u0054\u004d\u004c"] = '<option\x20value=\x22\x22>--省份--</option>' + _0x1f88f3; ps["\u0061\u0064\u0064\u0045\u0076\u0065\u006e\u0074\u004c\u0069\u0073\u0074\u0065\u006e\u0065\u0072"]('change', async () => { cs['value'] = ''; as["\u0076\u0061\u006c\u0075\u0065"] = ""; const { data: _0xa855b0 } = await axios['get']('/api/city', { "\u0070\u0061\u0072\u0061\u006d\u0073": { "\u0070\u006e\u0061\u006d\u0065": ps['value'] } }); const _0x58410a = _0xa855b0["\u006d\u0061\u0070"](_0x364261 => '<option\x20value=\x22' + _0x364261 + '\x22>' + _0x364261 + ">noitpo/<".split("").reverse().join(""))["\u006a\u006f\u0069\u006e"](""); cs['innerHTML'] = '<option\x20value=\x22\x22>--市--</option>' + _0x58410a; }); cs["\u0061\u0064\u0064\u0045\u0076\u0065\u006e\u0074\u004c\u0069\u0073\u0074\u0065\u006e\u0065\u0072"]("\u0063\u0068\u0061\u006e\u0067\u0065", async () => { as['value'] = ''; const { data: _0x242b47 } = await axios['get']("aera/ipa/".split("").reverse().join(""), { "\u0070\u0061\u0072\u0061\u006d\u0073": { "\u0070\u006e\u0061\u006d\u0065": ps['value'], "\u0063\u006e\u0061\u006d\u0065": cs['value'] } }); const _0x24736c = _0x242b47['map'](_0x4ab97c => '<option\x20value=\x22' + _0x4ab97c + ">\"".split("").reverse().join("") + _0x4ab97c + '</option>')["\u006a\u006f\u0069\u006e"](""); as['innerHTML'] = '<option\x20value=\x22\x22>--区--</option>' + _0x24736c; }); }; initCity(); document['querySelector']("\u0023\u006f\u0070\u0065\u006e\u004d\u006f\u0064\u0061\u006c")["\u0061\u0064\u0064\u0045\u0076\u0065\u006e\u0074\u004c\u0069\u0073\u0074\u0065\u006e\u0065\u0072"]("\u0063\u006c\u0069\u0063\u006b", () => { modalBox['querySelector']('form')["\u0072\u0065\u0073\u0065\u0074"](); modalBox["\u0071\u0075\u0065\u0072\u0079\u0053\u0065\u006c\u0065\u0063\u0074\u006f\u0072"]("eltit-ladom.".split("").reverse().join(""))["\u0069\u006e\u006e\u0065\u0072\u0048\u0054\u004d\u004c"] = "\u5458\u5B66\u52A0\u6DFB".split("").reverse().join(""); modalBox['dataset']["\u0069\u0064"] = 'add'; modal['show'](); }); const form = modalBox['querySelector']("mrof".split("").reverse().join("")); document["\u0071\u0075\u0065\u0072\u0079\u0053\u0065\u006c\u0065\u0063\u0074\u006f\u0072"]("\u0023\u0073\u0075\u0062\u006d\u0069\u0074")['addEventListener']("\u0063\u006c\u0069\u0063\u006b", async () => { const _0x21668e = serialize(form, { "\u0068\u0061\u0073\u0068": !![] }); _0x21668e["\u0061\u0067\u0065"] = +_0x21668e['age']; _0x21668e["\u0068\u006f\u0070\u0065\u005f\u0073\u0061\u006c\u0061\u0072\u0079"] = +_0x21668e['hope_salary']; _0x21668e["\u0073\u0061\u006c\u0061\u0072\u0079"] = +_0x21668e["\u0073\u0061\u006c\u0061\u0072\u0079"]; _0x21668e['gender'] = +_0x21668e['gender']; _0x21668e['group'] = +_0x21668e["\u0067\u0072\u006f\u0075\u0070"]; if (modalBox["\u0064\u0061\u0074\u0061\u0073\u0065\u0074"]['id'] !== "\u0061\u0064\u0064") { try { await axios['put']('/students/' + modalBox['dataset']['id'], _0x21668e); modal["\u0068\u0069\u0064\u0065"](); renderList(); } catch (_0x13f5fd) { alert("\u8D25\u5931\u6539\u4FEE".split("").reverse().join("")); } } else { try { await axios['post']("stneduts/".split("").reverse().join(""), _0x21668e); modal["\u0068\u0069\u0064\u0065"](); renderList(); } catch (_0x221f21) { alert("\u8D25\u5931\u52A0\u6DFB".split("").reverse().join("")); } } }); document["\u0071\u0075\u0065\u0072\u0079\u0053\u0065\u006c\u0065\u0063\u0074\u006f\u0072"]('.list')['addEventListener']("\u0063\u006c\u0069\u0063\u006b", async _0x53ce1d => { const _0x5e40f0 = _0x53ce1d['target']; if (_0x5e40f0["\u0063\u006c\u0061\u0073\u0073\u004c\u0069\u0073\u0074"]['contains']('bi-trash')) { try { await axios["\u0064\u0065\u006c\u0065\u0074\u0065"]("/stneduts/".split("").reverse().join("") + _0x5e40f0['dataset']["\u0069\u0064"]); renderList(); } catch (_0x1de379) { alert('删除失败'); } } if (_0x5e40f0['classList']['contains']('bi-pen')) { const { data: _0x2f6893 } = await axios['get']('/students/' + _0x5e40f0['dataset']['id']); const _0x311a82 = modalBox['querySelectorAll']("]eman[ mrof".split("").reverse().join("")); Array['from'](_0x311a82)['forEach'](async _0x281fb9 => { if (_0x281fb9['name'] === "redneg".split("").reverse().join("")) { if (+_0x281fb9["\u0076\u0061\u006c\u0075\u0065"] === _0x2f6893[_0x281fb9['name']]) _0x281fb9['checked'] = !![]; } else { _0x281fb9['value'] = _0x2f6893[_0x281fb9['name']]; } }); const { data: _0xda68f1 } = await axios["\u0067\u0065\u0074"]("\u002f\u0061\u0070\u0069\u002f\u0063\u0069\u0074\u0079", { 'params': { "\u0070\u006e\u0061\u006d\u0065": ps['value'] } }); const _0x2e071a = _0xda68f1['map'](_0x23d556 => "\"=eulav noitpo<".split("").reverse().join("") + _0x23d556 + '\x22>' + _0x23d556 + '</option>')['join'](""); cs['innerHTML'] = '<option\x20value=\x22\x22>--市--</option>' + _0x2e071a; cs['value'] = _0x2f6893['city']; const { data: _0x389e62 } = await axios['get']("aera/ipa/".split("").reverse().join(""), { 'params': { 'pname': ps['value'], 'cname': cs['value'] } }); const _0x537991 = _0x389e62["\u006d\u0061\u0070"](_0x474bc8 => '<option\x20value=\x22' + _0x474bc8 + '\x22>' + _0x474bc8 + '</option>')['join'](''); as['innerHTML'] = '<option\x20value=\x22\x22>--区--</option>' + _0x537991; as['value'] = _0x2f6893['area']; modalBox['querySelector']("eltit-ladom.".split("").reverse().join(""))['innerHTML'] = '修改学员'; modalBox['dataset']["\u0069\u0064"] = _0x2f6893['id']; modal['show'](); } });
  </script>
</body>

</html>